﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<ContextMenu x:Key="TextBoxContextMenu" Background="White">
		<MenuItem Header="Cut" InputGestureText="Ctrl + X" Command="ApplicationCommands.Cut" Template="{StaticResource MenuItemControlSubmenuTemplate}">
			<Image Source="/Images/Menu/cut_16x16.png"/>
		</MenuItem>
		<MenuItem Header="Copy" InputGestureText="Ctrl + C" Command="ApplicationCommands.Copy" Template="{StaticResource MenuItemControlSubmenuTemplate}">
			<Image Source="/Images/Menu/copy_16x16.png"/>
		</MenuItem>
		<MenuItem Header="Paste" InputGestureText="Ctrl + V" Command="ApplicationCommands.Paste" Template="{StaticResource MenuItemControlSubmenuTemplate}">
			<Image Source="/Images/Menu/paste_16x16.png"/>
		</MenuItem>
	</ContextMenu>
	<Style TargetType="{x:Type TextBox}">
		<Setter Property="Padding" Value="0,1,0,1"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="AcceptsReturn" Value="True"/>
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="FontFamily" Value="Consolas"/>
		<Setter Property="SpellCheck.IsEnabled" Value="True"/>
		<!--<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}"/>-->
		<Style.Triggers>
			<Trigger Property="MaxLines" Value="1">
				<Setter Property="AcceptsReturn" Value="False"/>
				<Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
			</Trigger>
			<Trigger Property="IsReadOnly" Value="True">
				<Setter Property="Background" Value="#E5E5E5"/>
				<Setter Property="IsTabStop" Value="False"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Background" Value="#E5E5E5"/>
				<Setter Property="SpellCheck.IsEnabled" Value="False"/>
			</Trigger>
		</Style.Triggers>
	</Style>
</ResourceDictionary>